<template>
  <BasicModal v-bind="$attrs" title="如何使用代码生成" :width="700" @register="registerModalInner">
    <MarkdownViewer :value="value" />
    <template #footer>
      <a-button @click="closeModal">关闭窗口</a-button>
    </template>
  </BasicModal>
</template>

<script setup lang="ts">
  import { useModalInner, BasicModal } from '@/components/Modal';
  import text from './howToEdit.md?raw';
  import { MarkdownViewer } from '@/components/Markdown';
  import { ref } from 'vue';

  const value = ref<string>(text);
  const [registerModalInner, { closeModal }] = useModalInner();
</script>

<style scoped></style>
